var client = require("./util/es.js");

client.indices.exists({
  index: "recommend"
}, (err, result) => {
  if(err) {
    console.log(err);
  } else {
    if(!result.body) {
      client.indices.create({
        index: "recommend"
      }, (err, result) => {
        if(err) {
          console.log(err.meta);
        } else {
          console.log("es index重建成功")
        }
      });
    }
  }
});
